package(default_visibility=["//visibility:public"])

load("//tools:defaults.bzl", "ng_module", "ng_package")
load("//:packages.bzl", "ROLLUP_GLOBALS")

ng_module(
  name = "material-moment-adapter",
  srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
  module_name = "@angular/material-moment-adapter",
  deps = [
    "@angular//packages/core",
    "@matdeps//moment",
    "//src/lib/core",
    "//src/lib/testing",
  ],
  # Explicitly specify the tsconfig that is also used by Gulp. We need to explicitly use this
  # tsconfig because in order to import Moment with TypeScript, we need some special options
  # enabled.
  tsconfig = ":tsconfig-build.json",
)

ng_package(
  name = "npm_package",
  srcs = ["package.json"],
  entry_point = "src/material-moment-adapter/public_api.js",
  globals = ROLLUP_GLOBALS,
  deps = [":material-moment-adapter"],
  # TODO(devversion): re-enable once we have set up the proper compiler for the ng_package
  tags = ["manual"],
)
